package me.zhanshi123.advancedcleaner.command.sub;

import me.zhanshi123.advancedcleaner.Main;
import me.zhanshi123.advancedcleaner.command.SubCommand;
import me.zhanshi123.advancedcleaner.command.type.AdminCommand;
import me.zhanshi123.advancedcleaner.entity.EntityCleanTask;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

public class EntityCommand extends SubCommand implements AdminCommand {
    public EntityCommand() {
        super("entity", "/ad entity", "Run the entity clean task immediately");
    }

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        new EntityCleanTask().runTask(Main.getInstance());
        sender.sendMessage("§7Task scheduled!");
        return true;
    }
}
